﻿using System;
using System.ServiceModel;
using FlickrSL;
using FlickrSL.Data;
using SilverlightRestServices.Description;

namespace FlickrSL
{
    public partial interface Flickr
    {
        [OperationContract(AsyncPattern = true)]
        [RestGet("services/rest/?method=flickr.auth.getFrob")]
        IAsyncResult BeginAuth_GetFrob(AsyncCallback callback, Object state);

        FlickrResponse<Frob> EndAuth_GetFrob(IAsyncResult result);

        [OperationContract(AsyncPattern = true)]
        [RestGet("services/rest/?method=flickr.auth.getToken")]
        IAsyncResult BeginAuth_GetToken(String frob, AsyncCallback callback, Object state);

        FlickrResponse<AuthToken> EndAuth_GetToken(IAsyncResult result);

        [OperationContract(AsyncPattern = true)]
        [RestGet("services/rest/?method=flickr.auth.checkToken")]
        IAsyncResult BeginAuth_CheckToken(String token, AsyncCallback callback, Object state);

        FlickrResponse<AuthToken> EndAuth_CheckToken(IAsyncResult result);
    }
}
